home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / protocol / standard / vga / intro.txt < prev    next >
Text File  |  1993-07-14  |  7KB  |  193 lines

  1. Introduction.
  2.  
  3. This is intended as a collection of documentation about all the various 
  4. display adapters for the IBM PC series (and relatives).
  5.  
  6.  
  7. Terminology/style:
  8.  
  9. The BIOS calls are mostly taken directly from Ralf's interrupt list
  10. and tends to follow its style and structure.
  11.  
  12. The register descriptions are sorted by the register number.
  13.  
  14. All register addresses, data values et cetera are given in hexadecimal.
  15.  
  16. 3d4h means 3D4h when in color mode and 3B4h when in monochrome mode.
  17.  
  18. 3CEh index 3 means register 3CEh is set to 3 and register 3CFh is the
  19.      data port. See notes on register 3C0h under VGA registers.
  20.      On some cards write operations can be done with a single OUTW
  21.      instruction. This may fail on some cards or machines.
  22.      ATI cards require the index to be updated before each access to
  23.      the dataport. 
  24.  
  25. (R)   means the register is Read Only.
  26. (W)   means the register is Write Only.
  27. (R/W) means the register is both Readable and Writable.
  28. (r/W) means the register is Write Only on EGA cards and Read/Writable
  29.       on VGA cards.
  30.  
  31.  
  32. Examples are in Turbo Pascal for readability (your mileage may vary,
  33.  I don't discuss politics, choice of computer, editor, keyboard,
  34.  programming language or other religious matters on the net  :-) ).
  35.  
  36.  
  37. A short translation of terms:
  38.  
  39. Pascal:         C:                    Assembler:         Description:
  40.  
  41. x:byte;         unsigned char x;      x  DB ?            8 bit unsigned byte
  42.  
  43. y:word;         unsigned int y;       y  DW ?            16 bit unsigned word. 
  44.  
  45. z:integer;      int z;                z  DW ?            16 bit signed word. 
  46.  
  47. w:longint;      long w;               w  DD ?            32 bit signed doubleword
  48.  
  49. s:string[20];   char s[21];           x DB 20 dup(?)     a 20 character string
  50.  
  51. $ABCD           0xABCD                0ABCDh             The value 43981 (ABCD hex)    
  52.  
  53. x:=port[$3CC]   x=inp(0x3CC)          MOV DX,03CCh       Read an 8bit value from 
  54.                       IN AL,DX           I/O port $3CC.
  55.  
  56. y:=portw[$3CE]  y=inpw(0x3CE)         MOV DX,03CEh       Read an 16bit value from
  57.                       IN AX,DX           I/O ports $3CE and $3CF. 
  58.  
  59. port[$3C2]:=x   outp(0x3C2,x)         MOV DX,03C2h       Write an 8bit value to
  60.                       OUT DX,AL          I/O port $3C2.
  61.  
  62. portw[$3CE]:=y  outpw(0x3CE,y)        MOV DX,03CEh       Write an 16bit value to
  63.                       OUT DX,AX          I/O ports $3CE and $3CF.
  64.  
  65. {Comment}       /* comment */         ;comment           Comments.
  66.   
  67. 'string'        "string"              DB "string"        Text string
  68.  
  69. procedure x;    void x(void)          x PROC             A procedure/function
  70. var x:integer;    {                    ;Alloc x on stack with no parameters
  71. begin               int x;             _code_            a local variable  
  72.   _code_            _code_             ;reset stack      and main body.
  73. end;              }                    RET
  74.  
  75. function y:     int y(void)          Well you            A function returning
  76.   integer;        {                  figure it out!      an integer.
  77. begin
  78.   y:=123;           return(123)
  79. end;              }   
  80.  
  81.  
  82.  
  83.  
  84. The examples use a number of simple rutines:
  85.  
  86. procedure vio(ax:word);    {Calls interrupt 10h with register AX=parameter ax
  87.                 other registers can be set in the rp structure.
  88.                 rp.ax is set to the return value in the AX register}
  89.  
  90. function inp(reg:word):byte;   {returns a byte from I/O port REG.}
  91.  
  92. procedure outp(reg,val:word);  {writes the byte VAL to I/O port REG}
  93.  
  94. function rdinx(pt,inx:word):word;   {read register PT index INX}
  95.  
  96. procedure wrinx(pt,inx,val:word);   {write VAL to register PT index INX}
  97.  
  98. procedure modinx(pt,inx,mask,nwv:word);
  99.                 {In register PT index INX change the bits
  100.                  indicated by MASK to the ones in NWV
  101.                  keeping the other bits unchanged).
  102.  
  103. function tstrg(pt,msk:word):boolean;   {Returns true if the bits specified in MSK 
  104.                     are read/writable in register PT}
  105.  
  106. function testinx(pt,rg:word):boolean;  {Returns true if all 8 bits of register
  107.                     PT index RG are read/writable}
  108.  
  109. function testinx2(pt,rg,msk:word):boolean;
  110.                        {Returns true if the bits specified in MSK
  111.                     are read/writable in register PT index RG} 
  112.  
  113. procedure dactopel;                    {Forces the DAC back to PEL (normal) mode}
  114.  
  115. procedure dactocomm;                   {Enter command mode of HiColor DACs}
  116.  
  117.  
  118.  
  119.  
  120. References:
  121.  
  122. Richard F. Ferraro's Programmer's guide to the EGA and VGA cards 2nd ed.
  123. Addison-Wesley 1990. ISBN 0-201-57025-4.
  124.  
  125. George Sutty and Steve Blair's Advanced Programmers Guide to Super VGAs.
  126. Brady Books 1990. ISBN 0-13-010455-8.
  127.  
  128. John Mueller and Wallace Wang's The Ultimate DOS Programmer's Manual.
  129. Windcrest/McGraw-Hill 1990. ISBN 0-8306-3434-3.
  130.  
  131. Ralf Brown's interrupt list version 33.
  132.     (Simtel: info/inter33a.zip - info/inter33c.zip)
  133.  
  134. John Bridge's VGAKIT52.
  135.     (Simtel: vga/vgakit52.zip)
  136.  
  137. Fractint v17.2 source (primarily video.asm).
  138.     (Simtel: graphics/frasr172.zip)
  139.  
  140. Configuration files and drivers from amongst others:
  141.   CSHOW:        (Simtel:  graphics/cshw850a.zip)
  142.   VPIC:         (Simtel:  gif/vpic51.zip)
  143.   VUIMAGE:      (Simtel:  gif/vuimg330.zip)
  144.   SVGA:         (Simtel:  gif/svga111.zip)
  145.  
  146. PCVISION plus Frame Grabber User's Manual.
  147.  
  148. Enhanced Graphics Adapter Reference Manual from HP.
  149.  
  150. Data Sheet for the Yamaha 6388 VPDC.
  151.  
  152. Commodore Advanced Graphics Adapter (AGA) manual.
  153.  
  154. Chips and Technologies Inc datasheets for:
  155.    82c455A, 82c456, 82c457, 82c480, 65520/530.
  156.  
  157. Truevision Targa+ Hardware Technical Reference Manual.
  158.  
  159. The following have contributed information:
  160.  
  161. Darren Senn   <sinster@scintilla.capitola.ca.us>
  162. Tomi H Engdahl <then@vipunen.hut.fi>
  163. Jori Hamalainen <jhamala@kannel.lut.fi>
  164. H.R.R van Roosmalen and E. Zoer, Delft University of Technology,
  165.       The Netherlands    <huub@dutetvd.ET.TUDelft.NL>
  166. Eric ?? <praetzel@marconi.uwaterloo.ca>
  167. Frank Klemm <pfk@rz.uni-jena.de>
  168. Michael Schindler <michael@eichow.tuwien.ac.at>
  169. Steven Martin <Steven.Martin@eng.monash.edu.au>
  170. Kendall Bennett <kjb@cgl.citri.edu.au>
  171. Leonardo Loureiro <loureiro@fiu.edu>
  172.  
  173.  
  174. Disclaimer:
  175.  
  176. All information herein is presented as is and without warranty.
  177. Use at your own risk.
  178.  
  179.  
  180. IBM PC, PC/XT, PC/AT, PCjr, PS/2, Micro Channel, Personal System/2,Enhanced Graphics 
  181. Adapter, Color Graphics Adapter, Video Graphics Adapter, IBM Color Display, IBM 
  182. Monochrome Display and 8514/A are trademarks of International Business Machines 
  183. Corporation.
  184. MS-DOS is a trademark of Microsoft, Incorporated.
  185. Hercules is a trademark of Hercules Computer Technology, Inc.
  186. Multisync is a trademark of Nippon Electric Company (NEC).
  187. Brooktree and RAMDAC are trademarks of Brooktree Corporation.
  188. SMARTMAP is a trademark of Chips and Technologies, Incorporated.
  189. TARGA is a registered trademark of Truevision, Inc.
  190. All other product names are copyright and registered trademarks/tradenames of their 
  191. respective owners.
  192.  
  193.